﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Coldairarrow.Business.Base_Manage;
using Coldairarrow.Business.Goods;
using Coldairarrow.Entity.Goods;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

namespace Coldairarrow.Api.Controllers.Frontstage
{
    [Route("/Frontstage/[controller]/[action]")]
    public class FTS_BannerController : BaseController
    {
        #region DI
       

        public FTS_BannerController(IBTB_BannerBusiness bTB_BannerBus, IHomeBusiness homeBus, ILogger<FTS_BannerController> logger)
        {
            _bTB_BannerBus = bTB_BannerBus;
        }

        IBTB_BannerBusiness _bTB_BannerBus { get; }

        #endregion
        /// <summary>
        /// 查询首页所有的轮播图
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public async Task<List<BTB_Banner>> GetHomeData()
        {
            return await _bTB_BannerBus.GetData(1);
        }

        /// <summary>
        /// 查询特惠所有的轮播图
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public async Task<List<BTB_Banner>> GePreferentialtData()
        {
            return await _bTB_BannerBus.GetData(2);
        }
    }
}
